﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;
using Code.Models;
using Code.BLL;

namespace QianBuo.Lottery.Web.Models.Account
{


    public class DetailSerchModel
    {
        public UserAccountDetailType? Type { get; set; }
        public DateTime? StartTime { get; set; }
        public DateTime? EndTime { get; set; }
        public double? MinMoney { get; set; }
        public double? MaxMoney { get; set; }
        public string UserName { get; set; }
    }

    public class DetailModel
    {
        public DetailModel()
        {
            Serch = new UserManage.UserAccountDetailSerch();
        }
        public UserManage.UserAccountDetailSerch Serch { get; set; }
        public List<AccountDetail> Details { get; set; }
        public int SumCount { get; set; }
        public int PageSize { get; set; }
        [Range(1,999999999)]
        public int? Page { get; set; }
        public Guid? uid { get; set; }
        public AccountDetail SumDetail { get; set; }
        public List<SelectListItem> Types { get; set; }
        public List<SelectListItem> UserTypes { get; set; }
        public string OrderByName { get; set; }
        public string OrderByType { get; set; }
    }

    public class AccountDetail
    {
        public AccountDetail()
        {
            Info = new Dictionary<string, string>();
        }
        public string ID{get;set;}
        public Guid UserID { get; set; }
        public string LoginName { get; set; }
        public DateTime? AddTime{get;set;}
        public short? UserType { get; set; }
        public double? Money { get; set; }
        public double? InMoney{get;set;}
        public double? OutMoney { get; set; }
        public string State { get; set; }
        public string StateText { get; set; }
        public UserAccountDetailType Type{get;set;}
        public string Memo { get; set; }
        public Dictionary<string, string> Info { get; set; }
    }

    public class ReportModel
    {
        public ReportModel()
        {
            Serch = new Code.BLL.UserManage.UserAccountReportSerch();
        }
        public Code.Models.Account Account { get; set; }
        public Code.BLL.UserManage.UserAccountReportSerch Serch { get; set; }
        public int SumCount { get; set; }
        public int PageSize { get; set; }
        public DateTime MimSerchEndTime { get; set; }
        public int Page { get; set; }
        public AccountReportModel SumReport { get; set; }
        public IEnumerable<AccountReportModel> Reports { get; set; }
    }

    public class AccountReportModel
    {
        public DateTime Date { get; set; }
        public int Year { get; set; }
        public int Month { get; set; }
        public int Day { get; set; }
        public double? SumAddMoney { get; set; }
        public double? SumTackMoney { get; set; }
        public double? SumPlayMoney { get; set; }
        public double? SumBackMoney { get; set; }
        public double? SumBackMoney_Child { get; set; }
        public double? SumWinMoney { get; set; }
        public double? SumWinMoney_Child { get; set; }
    }
}